# eric7.Plugins.VcsPlugins.vcsMercurial.HgExtensionProjectBrowserHelper

Module implementing the project browser helper base for Mercurial extension interfaces.

### Global Attributes

None

### Classes

HgExtensionProjectBrowserHelper | Class implementing the project browser helper base for Mercurial extension interfaces.

### Functions

None

## HgExtensionProjectBrowserHelper

Class implementing the project browser helper base for Mercurial extension interfaces.

Note: The methods initMenus() and menuTitle() have to be reimplemented by derived classes.

### Derived from

QObject

### Class Attributes

None

### Class Methods

None

### Methods

HgExtensionProjectBrowserHelper | Constructor
_updateVCSStatus | Protected method to update the VCS status of an item.
initMenus | Public method to generate the extension menus.
menuTitle | Public method to get the menu title.
showMenu | Public method to prepare the extension menu for display.

### Static Methods

None

#### HgExtensionProjectBrowserHelper (Constructor)

HgExtensionProjectBrowserHelper(vcsObject, browserObject, projectObject)

Constructor

vcsObject (Hg)
  reference to the vcs object
browserObject (ProjectBaseBrowser)
  reference to the project browser object
projectObject (Project)
  reference to the project object

#### HgExtensionProjectBrowserHelper._updateVCSStatus

_updateVCSStatus(name)

Protected method to update the VCS status of an item.

name (str)
  filename or directory name of the item to be updated

#### HgExtensionProjectBrowserHelper.initMenus

initMenus()

Public method to generate the extension menus.

Note: Derived class must implement this method.

Return:
  dictionary of populated menu. The dict must have the keys 'mainMenu', 'multiMenu', 'backMenu', 'dirMenu' and 'dirMultiMenu'.

Return Type:
  dict of QMenu

Raises NotImplementedError:
  raised if the class has not been reimplemented

#### HgExtensionProjectBrowserHelper.menuTitle

menuTitle()

Public method to get the menu title.

Note: Derived class must implement this method.

Return:
  title of the menu

Return Type:
  str

Raises NotImplementedError:
  raised if the class has not been reimplemented

#### HgExtensionProjectBrowserHelper.showMenu

showMenu(key, controlled)

Public method to prepare the extension menu for display.

Note: Derived class must implement this method to adjust the enabled states of its menus.

key (str)
  menu key (one of 'mainMenu', 'multiMenu', 'backMenu', 'dirMenu' or 'dirMultiMenu')
controlled (bool)
  flag indicating to prepare the menu for a version controlled entry or a non-version controlled entry

Raises NotImplementedError:
  raised if the class has not been reimplemented

Up